{template '_header'}
<script>document.title = "兑换中心"; </script>

<link rel="stylesheet" href="../addons/ewei_shopv2/plugin/exchange/static/css/common.css?v=201610091000">
<link href="../addons/ewei_shopv2/plugin/diypage/static/css/foxui.diy.css?v=201610091000"rel="stylesheet"type="text/css"/>

<div class='fui-page fui-page-current'>

    <div class="fui-content">

        {loop $diypage['items'] $diyitem}
            {template 'diypage/template/tpl_'.$diyitem['id']}
        {/loop}

        <div class="alert-success-outer" style="display: none;">
            <div class="alert-success">
                <div class="text" id="status1">恭喜！兑换成功！</div>
                <div class="btn btn-warning">确定</div>
            </div>
        </div>

        <div class="alert-error-outer" style="display: none;">
            <div class="alert-error">
                <div class="text" id="status0">很遗憾！兑换码已失效！</div>
                <div class="btn btn-warning">知道了</div>
            </div>
        </div>

    </div>
    <input type="hidden" name="url" value="{php echo mobileUrl('exchange',array(),1);}" id="url">
</div>

<script language='javascript'>
    require(['../addons/ewei_shopv2/plugin/exchange/static/js/common.js'],function(modal){
        modal.init({
            style: {
                exbtntext: "{$diypage['exchange_input']['params']['exbtntext']}",
                exbtn2text: "{$diypage['exchange_input']['params']['exbtn2text']}",
            }
        });
    });
</script>

{template '_footer'}